package com.cfp4cloud.cfp.common.mcp;

import com.cfp4cloud.cfp.common.core.factory.YamlPropertySourceFactory;
import com.cfp4cloud.cfp.common.mcp.config.CfpSecurityToolAspect;
import com.cfp4cloud.cfp.common.mcp.core.ToolAutoRegister;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.PropertySource;

/**
 * cfp AI MCP 自动配置类
 *
 * @author chenda
 * @date 2025/07/22
 */
@PropertySource(value = "classpath:mcp-config.yaml", factory = YamlPropertySourceFactory.class)
@Configuration(proxyBeanMethods = false)
@Import(ToolAutoRegister.class)
public class CfpAiMcpAutoConfiguration {

	@Bean
	public CfpSecurityToolAspect toolAspect() {
		return new CfpSecurityToolAspect();
	}

}
